<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"  xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>登录 - ApeNixX</title>
    <link rel="shortcut icon" th:href="@{/static/static/images/icon.png}" type="image/x-icon">
    <link th:href="@{/static/admin/layui/css/layui.css}" rel="stylesheet" />
    <link rel="stylesheet" th:href="@{/static/css/style.css}">
    <link th:href="@{/static/static/plug/font-awesome/css/font-awesome.min.css}" rel="stylesheet" />

      <!--全局样式表-->
      <link th:href="@{/static/static/css/global.css}" rel="stylesheet" />
      <!--本页样式表-->
      <link th:href="@{/static/static/css/home.css}" rel="stylesheet" />
 
</head>
<body>
<!-- 导航 -->
<nav th:replace="header::header-nav('aa')">
</nav>


<div class="login-main">
    <header class="layui-elip">登录</header>
    <form class="layui-form" th:action="@{/user/home}" method="post">

        <div class="layui-input-inline">
            <div class="layui-inline">
                <i class="layui-icon layui-icon-cellphone"></i>
                <!--<i class="fa fa-mobile  fa-2x" aria-hidden="true"></i>-->
            </div>
            <div class="layui-inline" style="width: 93%">
            <input type="text" name="username" required lay-verify="required" placeholder="用户名" autocomplete="off"
                   class="layui-input">
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-inline">
                <i class="layui-icon layui-icon-password"></i>

                <!--<i class="fa fa-lock fa-lg" aria-hidden="true"></i>-->
            </div>
            <div class="layui-inline" style="width: 93%">
            <input type="password" name="password" required lay-verify="required" placeholder="密码" autocomplete="off"
                   class="layui-input"></div>
        </div>
        <div style="text-align: center" th:if="${session.errorMsg} != null">
            <span style="color: red" th:text="${session.errorMsg}"></span>
        </div>

        <div class="layui-input-inline login-btn">
            <button lay-submit lay-filter="login" type="submit" class="layui-btn">登录</button>
        </div>
        <hr/>
        <!--<div class="layui-input-inline">
            <button type="button" class="layui-btn layui-btn-primary">QQ登录</button>
        </div>
        <div class="layui-input-inline">
            <button type="button" class="layui-btn layui-btn-normal">微信登录</button>
        </div>-->
        <p><a th:href="@{/user/register}" class="fl">立即注册</a><a href="javascript:;"  onclick="onForget()" class="fr">忘记密码？</a></p>
    </form>
    <div class="layui-row" id="popUpdateTest" style="display:none;padding: 30px;">
        <div class="layui-col-md10">
            <form class="layui-form">
                <div class="layui-input-inline">
                    <!-- 手机号 -->
                    <!--<div class="layui-inline">手机号:</div>-->
                    <div class="layui-inline">
                        <i class="layui-icon layui-icon-cellphone"></i>
                        <!--<i class="fa fa-mobile  fa-2x" aria-hidden="true"></i>-->
                    </div>
                    <div class="layui-inline" style="width: 85%">
                        <input type="text" id="phone" name="phone" required  lay-verify="required" placeholder="请输入手机号" autocomplete="off" class="layui-input">
                    </div>
                    <!-- 对号 -->
                    <div class="layui-inline">
                        <i class="layui-icon" id="sri" style="color: green;font-weight: bolder;" hidden></i>
                    </div>
                    <!-- 错号 -->
                    <div class="layui-inline">
                        <i class="layui-icon" id="swr" style="color: red; font-weight: bolder;" hidden>ဆ</i>
                    </div>
                </div>



                <div class="layui-inline">
                    <!-- 验证码 -->
                    <div class="layui-inline" style="margin-top: -3%;">
                        <i class="layui-icon layui-icon-vercode"></i>
                        <!--<i class="fa fa-get-pocket" aria-hidden="true"></i>-->
                    </div>
                    <div class="layui-input-inline" style="width: 48%;">
                        <input type="text" id="auth_code" name="phone" required  lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">
                    </div>

                    <button type="button" id="msg_btn" class="layui-btn  layui-btn-radius" style="margin-top: -5%;">获取验证码</button>


                </div>

                <!-- 密码 -->
                <div class="layui-input-inline">
                    <div class="layui-inline">
                        <i class="layui-icon layui-icon-password"></i>
                    </div>

                    <div class="layui-inline" style="width: 85%">
                        <input type="password" id="password" name="password" required  lay-verify="required" placeholder="请输入6位以上的密码" autocomplete="off" class="layui-input">
                    </div>
                    <!-- 对号 -->
                    <div class="layui-inline">
                        <i class="layui-icon" id="pri" style="color: green;font-weight: bolder;" hidden></i>
                    </div>
                    <!-- 错号 -->
                    <div class="layui-inline">
                        <i class="layui-icon" id="pwr" style="color: red; font-weight: bolder;" hidden>ဆ</i>
                    </div>
                </div>
                <!-- 确认密码 -->
                <div class="layui-input-inline">
                    <div class="layui-inline">
                        <i class="layui-icon layui-icon-password"></i>
                    </div>
                    <div class="layui-inline" style="width: 85%">
                        <input type="password" id="rpwd" name="repassword" required  lay-verify="required" placeholder="请确认密码" autocomplete="off" class="layui-input">
                    </div>
                    <!-- 对号 -->
                    <div class="layui-inline">
                        <i class="layui-icon" id="rpri" style="color: green;font-weight: bolder;" hidden></i>
                    </div>
                    <!-- 错号 -->
                    <div class="layui-inline">
                        <i class="layui-icon" id="rpwr" style="color: red; font-weight: bolder;" hidden>ဆ</i>
                    </div>
                </div>



                <div class="layui-input-inline login-btn" style="width: 90%">
                    <button type="button" id="registerFormBtn" class="layui-btn">确定修改</button>
                </div>

            </form>
        </div>
    </div>

</div>
    <!--侧边导航-->
<ul class="layui-nav layui-nav-tree layui-nav-side blog-nav-left layui-hide" lay-filter="nav">
    <li sec:authorize="hasAnyRole('ROLE_USER')" class="layui-nav-item" style="margin-bottom: 30px;">
        <a href="javascript:;" class="blog-user">
            <!--<img th:src="@{/static/static/images/Absolutely.jpg}" alt="Absolutely" title="Absolutely" />-->
            <img style=" width: 40px;height: 40px;border-radius: 50px;" th:src="@{${session.SPRING_SECURITY_CONTEXT.authentication.principal.avatarImgUrl}}" />
            <!--<sec:authentication property="principal.id"/>-->
            <span sec:authentication="name"></span>&nbsp;
        </a>
        <dl class="layui-nav-child">
            <dd><a th:href="@{/user/user}">基本资料</a></dd>
            <dd><a class="news" th:href="@{/user/user}">我的消息</a></dd>
            <dd><a th:href="@{/user/user}">安全设置</a></dd>
            <dd sec:authorize="hasAnyRole('ROLE_VIP')"><a th:href="@{/admin/index}">后台管理</a></dd>
            <dd><a th:href="@{/logout}">退出登录</a></dd>
        </dl>
    </li>

    <li class="layui-nav-item">
        <a th:href="@{/article/index/1}"><i class="fa fa-home fa-fw"></i>&nbsp;网站首页</a>
    </li>
    <li class="layui-nav-item">
        <a th:href="@{/category/1}"><i class="fa fa-file-text fa-fw"></i>&nbsp;文章专栏</a>
    </li>
    <li class="layui-nav-item">
        <a th:href="@{/user/archives}"><i class="fa fa-tags fa-fw"></i>&nbsp;归档</a>
    </li>
    <li class="layui-nav-item">
        <a th:href="@{/user/resource}"><i class="fa fa-road fa-fw"></i>&nbsp;资源分享</a>
    </li>
    <li class="layui-nav-item">
        <a th:href="@{/user/timeline}"><i class="fa fa-info fa-fw"></i>&nbsp;点点滴滴</a>
    </li>
    <li class="layui-nav-item">
        <a th:href="@{/user/about}"><i class="fa fa-info fa-fw"></i>&nbsp;关于本站</a>
    </li>
    <li sec:authorize="anonymous" class="layui-nav-item    layui-this" style="float: right;">
        <a th:href="@{/user/login}">&nbsp;&nbsp;登录</a>
    </li>
    <li sec:authorize="anonymous" class="layui-nav-item" style="float: right;">
        <a th:href="@{/user/register}">&nbsp;&nbsp;注册</a>
    </li>
</ul>

<script th:src="@{/static/static/plug/layui/layui.js}"></script>
<!-- 全局脚本 -->
<script th:src="@{/static/static/js/global.js}"></script>
<!-- 本页脚本 -->
<script th:src="@{/static/static/js/login.js}"></script>


</body>
</html>